package com.cskaoyan.day3;

import java.util.Scanner;

public class ScannerTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请分别输入学科（数学，语文，英语）成绩");
        double mathScore = sc.nextDouble();
        double chineseScore = sc.nextDouble();
        double englishScore = sc.nextDouble();
        double higerScore = mathScore > chineseScore ? mathScore : chineseScore;
        double lowerScore = mathScore < chineseScore ? mathScore : chineseScore;
        System.out.println("平均分：" + (mathScore + chineseScore + englishScore) / 3);
        System.out.println("最高分：" + (higerScore > englishScore ? higerScore : englishScore));
        System.out.println("最低分：" + (lowerScore > englishScore ? lowerScore : englishScore));
    }
}
